﻿using AntdUI;
using S7SingalTool.Models.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace S7SingalTool.Controls
{
    public class MainMenu:AntdUI.Menu
    {
        public MainMenu() 
        {
            this.Items.Clear();
            if (!DesignMode)
                InitMenu();
        }

       

        public void InitMenu()
        {
            this.Items.Clear();
            List<MenuItems> menuItems = new List<MenuItems>() {
                 new MenuItems { Text = "PLC配置" , Tag = "plcConfig"},
                 new MenuItems { Text = "DB块管理" ,Tag = "blockDbConfig"},
                 new MenuItems { Text = "点位配置" ,Tag = "pointConfig"},
                //new MenuItems { Text = "数据采集配置" ,Tag = "collectDataConfig"},
                //new MenuItems { Text = "工参模板" ,Tag = "techniqueTemplate"},
                //new MenuItems { Text = "工艺路线" ,Tag = "techniqueRoad"},
            };
            foreach (MenuItems item in menuItems)
            {
                var rootMenu = new AntdUI.MenuItem { Text = item.Text, IconSvg = item.IconSvg, Tag = item.Tag };
                this.Items.Add(rootMenu);
               
            }

        }
    }
}
